From a7c455a24efa098558e87aa752b5fc00b969222d Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 21 Oct 2004 17:24:01 +0000 Subject: [PATCH] Add 'deficon' to garmin modes. --- gpsbabel/Makefile | 8 ++++---- gpsbabel/garmin.c | 12 +++++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/gpsbabel/Makefile b/gpsbabel/Makefile index 35ac1039a..2e235b5ca 100644 --- a/gpsbabel/Makefile +++ b/gpsbabel/Makefile @@ -88,10 +88,10 @@ dep: (echo -n "internal_styles.c: mkstyle.sh " ; echo style/*.style ; /bin/echo -e '\t./mkstyle.sh > internal_styles.c || (rm -f internal_styles.c ; exit 1)' ) >> /tmp/dep echo Edit Makefile and bring in /tmp/dep -#VERSIONU=1_2_4_beta10162004 -#VERSIOND=1.2.4_beta10162004 -VERSIONU=1_2_4 -VERSIOND=1.2.4 +VERSIONU=1_2_5_beta10212004 +VERSIOND=1.2.5_beta10212004 +#VERSIONU=1_2_4 +#VERSIOND=1.2.4 release: cvs commit diff --git a/gpsbabel/garmin.c b/gpsbabel/garmin.c index 898fc59ac..57b729c7a 100644 --- a/gpsbabel/garmin.c +++ b/gpsbabel/garmin.c @@ -36,6 +36,7 @@ static char *getposn = NULL; static char *poweroff = NULL; static char *snlen = NULL; static char *snwhiteopt = NULL; +static char *deficon = NULL; static arglist_t garmin_args[] = { @@ -43,6 +44,7 @@ arglist_t garmin_args[] = { ARGTYPE_INT }, { "snwhite", &snwhiteopt, "(0/1) Allow whitespace synth. shortnames", NULL, ARGTYPE_BOOL}, + { "deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING }, { "get_posn", &getposn, "Return current position as a waypoint", NULL, ARGTYPE_BOOL}, { "power_off", &poweroff, "Command unit to power itself down", @@ -452,10 +454,14 @@ waypoint_write(void) way[i]->lon = wpt->longitude; way[i]->lat = wpt->latitude; - if (get_cache_icon(wpt)) { - icon = mps_find_icon_number_from_desc(get_cache_icon(wpt), PCX); + if (deficon) { + icon = mps_find_icon_number_from_desc(deficon, PCX); } else { - icon = mps_find_icon_number_from_desc(wpt->icon_descr, PCX); + if (get_cache_icon(wpt)) { + icon = mps_find_icon_number_from_desc(get_cache_icon(wpt), PCX); + } else { + icon = mps_find_icon_number_from_desc(wpt->icon_descr, PCX); + } } /* For units that support tiny numbers of waypoints, just -- 2.30.2